import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
    state: {
        singer: {}
        //在歌手列表页和歌手详情页之间传递歌手的信息

    },
    mutations: {
        saveSinger(state, singer) {
            state.singer = singer
        }

    },
    actions: {
        saveSinger(context, singer) {
            context.commit('saveSinger', singer)
        }


    }
})
export default store